package com.book.common;

/**
 * @version 1.0
 * @Author Jincheng.Li
 * @Date 2021/5/17 9:02 下午
 * @Project_Name graduation-project
 */
public enum BookTypeEnum {
    BOOK_TYPE_ENUM_SELL(1, "出售"),
    BOOK_TYPE_ENUM_GET(0, "收购");

    private Integer code;
    private String msg;

    BookTypeEnum (Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public static String getMsg(Integer code) {
        BookTypeEnum [] payTypeEnums = values();
        for (BookTypeEnum p : payTypeEnums
        ) {
            if (p.code.equals(code)) {
                return p.msg;
            }
        }
        return null;
    }
}
